#ifndef __LEVEL__
#define __LEVEL__
/*
    封装日志等级
*/

namespace Log
{
    enum class LogType
    {
        UNKNOW,
        DEBUG,
        INFO,
        WARNING,
        ERROR,
        FATAL, 
        OFF // 关闭日志
    };
    class LogLevel
    {
    public:
        static const char* toString(LogType type)
        {
            switch(type)
            {
                case LogType::DEBUG: return "DEBUG";
                case LogType::INFO: return "INFO";
                case LogType::WARNING: return "WARNING";
                case LogType::ERROR: return "ERROR";
                case LogType::FATAL: return "FATAL";
                case LogType::OFF: return "OFF";
                default: return "UNKNOW";
            }
        }

    };
}







#endif